package org.ascollada.core
{
	import org.ascollada.core.ns.collada;
	
	public class DaeController extends DaeElement
	{
		use namespace collada;
		
		/**
		 * 
		 */ 
		public var morph :DaeMorph;
		
		/**
		 * 
		 */ 
		public var skin :DaeSkin;
		
		/**
		 * 
		 */ 
		public function DaeController(document:DaeDocument, element:XML=null)
		{
			super(document, element);
		}
		
		/**
		 * @inheritDoc
		 */ 
		public override function read(element:XML):void
		{
			super.read(element);
			
			if(element.skin[0])
			{
				this.skin = new DaeSkin(document, element.skin[0]);
			}
			else if(element.morph[0])
			{
				this.morph = new DaeMorph(document, element.morph[0]);
			}
		}
	}
}